#ifndef SHUANGREN_H
#define SHUANGREN_H
#include<QLabel>
#include <QWidget>
#include<QPainter>
#include<QMouseEvent>
#include<QMessageBox>
#include <QVector>
namespace Ui {
class shuangren;
}
#define player1 0
#define player2 1
class shuangren : public QWidget
{
    Q_OBJECT

public:
    explicit shuangren(QWidget *parent = 0);
    //静态公有的获取类对象指针的方法
    static shuangren* getInstance();
    //鼠标点击事件
    void mousePressEvent(QMouseEvent *event);
     //落子函数
    bool piecePress(bool object,int x,int y);
     //输赢判定函数
    bool winner();
    //重新开始游戏
    void newGame();
    ~shuangren();
    static shuangren* pchessboard;
     //棋盘图片
    QLabel *bg;
     //棋子图片
    QLabel *piece;
    static QVector<QVector<int>> chess;
       //棋盘窗口
       QWidget *chessWin;
   signals:
   public slots:

private slots:
       void on_groupBox_clicked();

       void on_groupBox_windowTitleChanged(const QString &title);

private:
    Ui::shuangren *ui;

   };

#endif // SHUANGREN_H
